package cn.wenhe9.service.impl;

import cn.wenhe9.domain.User;
import cn.wenhe9.mapper.UserMapper;
import cn.wenhe9.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper mapper;

    @Override
    public User login(User user) {
        User result = null;
        try {
            result = mapper.findByCodeAndPassword(user);
        }catch (NullPointerException e){

        }
        return result;
    }
}
